from es import server
from weaponlib import getWeaponNameList
from random import choice, shuffle
from superdice.superdice import registerRoll, unregisterRoll

def unload():
    unregisterRoll(diceRoll)

def diceRoll(userid, player, eplayer):
    shuffle(weapons)
    eplayer.givePlayer(choice(weapons))

registerRoll(diceRoll, 'randomgrenade')

weapons = getWeaponNameList('#grenade')
